package com.htrq.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.htrq.dao.HRoleDao;
import com.htrq.entity.HRole;
import com.htrq.entity.Page;

@Service
@Transactional(value="txManager")
public class HRoleService {
	@Resource
	private HRoleDao hrDao;

	public void saverole(HRole hr) {
		hrDao.add(hr);
	}

	public List<HRole> getAllByPage(Page page) {
		return hrDao.getAllByPage(page);
	}

	public Long getTotal() {
		return hrDao.getTotal();
	}

	public List<HRole> getAll() {
		return hrDao.getAll();
	}
}
